home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: chang.unx.sas.com!walker
- From: walker@chang.unx.sas.com (Doug Walker)
- Subject: Re: Ceck out this bug. What the *** is SASC/6.56 doing?
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Message-ID: <Do9Gpy.Juv@unx.sas.com>
- Date: Thu, 14 Mar 1996 14:10:45 GMT
- X-Nntp-Posting-Host: chang.unx.sas.com
- References: <1120.6643T91T406@login.eunet.no> <v24trvir4v.fsf@athena-e.eurpd.csg.mot.com> <879.6646T4T2378@login.eunet.no>
- Organization: SAS Institute Inc.
-
- In article <879.6646T4T2378@login.eunet.no>,
- Patrick Hanevold <patrick.hanevold@login.eunet.no> wrote:
- >
- >>You're probably overflowing your stack. That ULONG Palette is 6144 bytes,
- >>and since it is a local variable it is stored on the stack.
- >Try dividing by two, then you are getting a little closer. :)
- >
- >>Look at your CLI stack size. If it's low (especially lower than 7000)
- >>then you need more. Set it to 20K and I bet you don't crash.
- >
- >>In SAS you can set long __stack = 10000 or whatever to force the program's
- >>stack to be larger. Then you won't have to worry about the CLI stack.
- >
- >If it is the stack, then SC's stack check routines are crapp.
-
- The SAS/C stack check routines are performing exactly as documented and
- exactly as designed. They are doing everything it is reasonable to expect
- them to do, namely, make sure that the function compiled with stack checking
- has enough stack for its use. If you think it is possible for the compiler
- to protect your program against every stupid thing it tries to do, you are
- sadly mistaken. The responsibility to make sure your program behaves
- intelligently is yours, not the compiler's. I suggest you read the section
- of the manual devoted to disussion stack checking, stack extension, and
- the runtime architecture of a C program.
-
- >Anyway, none of the OS calls themseves crash. Its SC's exit routines
- >that messes around in memory. Avent checked so much whats going on around
- >there, but it shouldnt crash with stack check or stack extend on.
-
- With a stack trash, it is quite likely that nothing bad would happen
- before the program exits. It all depends on what is lying around in
- memory that happened to get trashed when the stack was overrun.
-
- --
- *****
- *|_o_o|\\ Doug Walker walker@unx.sas.com
- *|. o.| ||
- | o |// Any opinions are mine, not those of SAS Institute, Inc.
- ======
-